<!doctype html>
<html lang="en">
<head>
<title>wqy final_python</title>
<meta charset="utf-8"/>
</head>
            <!-- Favicons -->
<link rel="apple-touch-icon" href="https://gitee.com/wenqianya/python-pictures/raw/master/logo.png" sizes="180x180">
<link rel="icon" href="https://gitee.com/wenqianya/python-pictures/raw/master/logo.png" sizes="32x32" type="image/png">
<link rel="icon" href="https://gitee.com/wenqianya/python-pictures/raw/master/logo.png" sizes="16x16" type="image/png">
<link rel="mask-icon" href="https://gitee.com/wenqianya/python-pictures/raw/master/logo.png" color="#7952b3">
<link rel="icon" href="https://gitee.com/wenqianya/python-pictures/raw/master/logo.png">
<meta name="theme-color" content="#7952b3">

<body>
  <div class="navbar navbar-dark bg-dark shadow-sm">
    <div class="container">
      <br href="/" class="navbar-brand d-flex align-items-center">
          <svg xmlns=<svg t="1641562428470" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1155" width="40" height="40"><path d="M514.286299 2.505864h3.565417V895.785974h-3.565417z" fill="#EDA639" p-id="1156"></path><path d="M69.430967 447.365225h893.276081v3.55736H69.430967z" fill="#EDA639" p-id="1157"></path><path d="M517.811429 452.578389m-430.932074 0a430.932074 430.932074 0 1 0 861.864148 0 430.932074 430.932074 0 1 0-861.864148 0Z" fill="#FFE770" p-id="1158"></path><path d="M520.027225 493.522274v160.145663" fill="#FFE770" p-id="1159"></path><path d="M520.027225 675.024184a21.352218 21.352218 0 0 1-21.352218-21.356247v-160.145663a21.352218 21.352218 0 0 1 42.708465 0v160.145663a21.352218 21.352218 0 0 1-21.356247 21.356247z" fill="#6E6E96" p-id="1160"></path><path d="M300.917211 313.051716l62.279988-62.279988 62.279988 62.279988" fill="#FFE770" p-id="1161"></path><path d="M425.477187 334.403934a21.299845 21.299845 0 0 1-15.099644-6.252574L363.197199 280.971016 316.016855 328.15136a21.352218 21.352218 0 1 1-30.199288-30.199288l62.279988-62.279988a21.352218 21.352218 0 0 1 30.199288 0l62.279988 62.279988a21.352218 21.352218 0 0 1-15.099644 36.451862z" fill="#6E6E96" p-id="1162"></path><path d="M610.536457 313.051716l62.284017-62.279988 62.279988 62.279988" fill="#FFE770" p-id="1163"></path><path d="M735.100462 334.403934a21.299845 21.299845 0 0 1-15.099644-6.252574l-47.180344-47.180344-47.184373 47.180344a21.356247 21.356247 0 0 1-30.195259-30.199288l62.279988-62.279988a21.352218 21.352218 0 0 1 30.195259 0l62.279989 62.279988a21.352218 21.352218 0 0 1-15.095616 36.451862z" fill="#6E6E96" p-id="1164"></path><path d="M519.624353 45.947556c-3.831313 0-7.65054 0.068488-11.449623 0.173235 203.095851 5.785242 365.960901 172.231825 365.960901 376.72967 0 208.159953-168.746981 376.898877-376.906934 376.898877-208.155924 0-376.902905-168.738924-376.902906-376.898877a377.615989 377.615989 0 0 1 12.061989-94.924709 406.368966 406.368966 0 0 0-19.523179 124.777527c0 224.645477 182.114276 406.755723 406.759752 406.755724s406.755723-182.110247 406.755724-406.755724c0-224.645477-182.110247-406.755723-406.755724-406.755723z" fill="#FF9900" opacity=".24" p-id="1165"></path><path d="M517.811429 901.305321c-103.779837 0-204.98935-36.262512-284.979593-102.095831-78.906517-64.947001-133.733373-155.508606-154.380564-255.005914a451.740415 451.740415 0 0 1-9.366775-91.629216C69.084497 205.14647 270.383539 3.847428 517.811429 3.847428c247.42789 0 448.726932 201.299042 448.726932 448.726932 0 247.42789-201.299042 448.730961-448.726932 448.730961z m0-861.864149c-227.803993 0-413.137216 185.333223-413.137216 413.137217 0 28.43068 2.900679 56.821072 8.621461 84.397663 19.003474 91.576843 69.487369 174.951211 142.153398 234.757565 73.636951 60.604041 166.813196 93.981989 262.366386 93.981988 227.808022 0 413.137216-185.333223 413.137216-413.137216S745.619451 39.441172 517.811429 39.441172z" fill="#6E6E96" p-id="1166"></path><path d="M809.635818 752.069432m-135.542268 0a135.542268 135.542268 0 1 0 271.084536 0 135.542268 135.542268 0 1 0-271.084536 0Z" fill="#FFE770" p-id="1167"></path><path d="M809.635818 905.406558c-84.546726 0-153.337126-68.786372-153.337126-153.341154 0-84.546726 68.786372-153.337126 153.337126-153.337126s153.341155 68.786372 153.341155 153.337126c-0.004029 84.554783-68.7904 153.341155-153.341155 153.341154z m0-271.084536c-64.926857 0-117.74741 52.816524-117.74741 117.74741s52.816524 117.751439 117.74741 117.751439 117.751439-52.816524 117.751439-117.751439c-0.004029-64.930886-52.820553-117.74741-117.751439-117.74741z" fill="#6E6E96" p-id="1168"></path><path d="M218.864263 752.069432m-135.542268 0a135.542268 135.542268 0 1 0 271.084536 0 135.542268 135.542268 0 1 0-271.084536 0Z" fill="#FFE770" p-id="1169"></path><path d="M218.864263 905.406558c-84.550754 0-153.337126-68.786372-153.337126-153.341154 0-84.546726 68.786372-153.337126 153.337126-153.337126s153.337126 68.786372 153.337126 153.337126c0 84.554783-68.786372 153.341155-153.337126 153.341154z m0-271.084536c-64.926857 0-117.74741 52.816524-117.74741 117.74741s52.820553 117.751439 117.74741 117.751439 117.751439-52.816524 117.751439-117.751439c-0.004029-64.930886-52.824581-117.74741-117.751439-117.74741z" fill="#6E6E96" p-id="1170"></path><path d="M305.248085 455.213172a61.824743 28.845638 0 1 0 123.649486 0 61.824743 28.845638 0 1 0-123.649486 0Z" fill="#FF0000" opacity=".18" p-id="1171"></path><path d="M615.403151 455.213172a61.820714 28.845638 0 1 0 123.641429 0 61.820714 28.845638 0 1 0-123.641429 0Z" fill="#FF0000" opacity=".18" p-id="1172"></path><path d="M410.079418 993.43007h193.378577a16.114881 16.114881 0 0 0 0-32.229763h-193.378577a16.114881 16.114881 0 0 0 0 32.229763z" fill="#6E6E96" opacity=".29" p-id="1173"></path><path d="M675.435114 993.43007h56.402085a16.114881 16.114881 0 0 0 0-32.229763h-56.402085a16.114881 16.114881 0 0 0 0 32.229763z" fill="#6E6E96" opacity=".17" p-id="1174"></path><path d="M332.993882 961.200307h-44.315924a16.114881 16.114881 0 0 0 0 32.229763h44.315924a16.114881 16.114881 0 0 0 0-32.229763z" fill="#6E6E96" opacity=".17" p-id="1175"></path></svg>
  <path d="M8.5 5.5a.5.5 0 0 0-1 0v3.362l-1.429 2.38a.5.5 0 1 0 .858.515l1.5-2.5A.5.5 0 0 0 8.5 9V5.5z"/>
  <path d="M6.5 0a.5.5 0 0 0 0 1H7v1.07a7.001 7.001 0 0 0-3.273 12.474l-.602.602a.5.5 0 0 0 .707.708l.746-.746A6.97 6.97 0 0 0 8 16a6.97 6.97 0 0 0 3.422-.892l.746.746a.5.5 0 0 0 .707-.708l-.601-.602A7.001 7.001 0 0 0 9 2.07V1h.5a.5.5 0 0 0 0-1h-3zm1.038 3.018a6.093 6.093 0 0 1 .924 0 6 6 0 1 1-.924 0zM0 3.5c0 .753.333 1.429.86 1.887A8.035 8.035 0 0 1 4.387 1.86 2.5 2.5 0 0 0 0 3.5zM13.5 1c-.753 0-1.429.333-1.887.86a8.035 8.035 0 0 1 3.527 3.527A2.5 2.5 0 0 0 13.5 1z"/>
</svg>


      </br>
        <strong>新年必买物品</strong>
      </a>
    </div>
  </div>

<style>
	* {
		margin: 0;
		padding: 0;
		font-family: "微软雅黑";
		list-style: none;
		color: #666;
		text-decoration: none;
		font-size: 17px;
	}

    body {
	margin: 0;
	width: 100%;
	height: 100vh;
	font-family: "Exo", sans-serif;
	color: #ec0808;
	background: linear-gradient(-45deg, rgba(243, 237, 237, 0.79), rgba(241, 67, 82, 0.65), rgba(238, 222, 222, 0.99), rgba(248, 6, 6, 0.73));
	background-size: 400% 400%;
	animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.container {
	width: 100%;
	top: 35%;
	text-align: center;
}

h1 {
	font-weight: 300;
}

h3 {
	color: #eee;
	font-weight: 100;
}

h5 {
	color:#eee;
	font-weight:300;
}

a,
a:hover {
	text-decoration: none;
	color: #f30808;
}

	.hid {
		overflow: hidden;
	}
	.left {
		float: left;
	}
	#box {
		width: 978px;
		margin: 20px auto;
	}
	#box ul {
		margin-right: -14px;
		overflow: hidden;
	}
	#box li {
		width: 234px;
		float: left;
		margin-right: 14px;
		padding: 34px 0 20px;
		background: rgba(255, 255, 255, 0.72);
		text-align: center;
		position: relative;
		cursor: pointer;
		margin-bottom:14px;
	}
	.pro_img {
		width: 150px;
		height: 150px;
		margin: 0 auto 20px;
	}
	.pro_name {
		display: block;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
		font-weight: 400;
	}
	.pro_name a {
		color: #333;
	}
	.pro_price {
		color: #da0f0f;
		margin: 0 20px 20px;
	}
	.pro_rank {
		color: #706e6e;
	}
	#box li:hover .add_btn {
		display: block;
	}
	.add_btn {
		background: #ffffff;
		height: 66px;
		position: absolute;
		width: 100%;
		bottom: 0;
		left: 0;
		line-height: 66px;
		display: none;
		color: #f6d216;
		font-size: 20px;
	}
	.car {
		width: 978px;
		margin: 20px auto;
		background: #FFF;
	}
	.car .img {
		width: 190px;
	}
	.car .img img {
		display: block;
		width: 80px;
		height: 80px;
		margin: 3px auto;
	}
	.car .name {
		width: 350px;
	}
	.car .name span {
		line-height: 1;
		margin-top: 8px;
		margin-bottom: 8px;
		font-size: 18px;
		font-weight: normal;
		text-overflow: ellipsis;
		white-space: nowrap;
		overflow: hidden;
	}
	.car .price {
		width: 144px;
		text-align: right;
		padding-right: 84px;
	}
	.car .price span {
		color: #f89c26;
		font-size: 16px;
	}
	.car .ctrl {
		width: 175px;
		padding-right: 25px;
		text-align: center;
	}
	.car .ctrl a {
		font-size: 20px;
		cursor: pointer;
		display: block;
		width: 26px;
		height: 26px;
		margin: 30px auto;
		line-height: 26px;
	}
	.car .ctrl a:hover {
		color: #FFF;
		background: #000000;
	}
	.head_row {
		height: 70px;
		line-height: 70px;
	}
	.head_row, .row {
		border-bottom: solid 1px #a6a5a5;
	}
	.row {
		height: 90px;
		line-height: 90px;
		padding: 20px 0;
	}
</style>
<script>

	window.onload = function(){
		var aData = [{"imgUrl":"https://t10.baidu.com/it/u=2231803557,3780762227&fm=173&s=342AFE170A416CD604A249EC0300A02A&w=420&h=299&img.JPG","proName":"年货零食大礼包","proPrice":"66","proComm":"8.6"},
					 {"imgUrl":"https://img2.baidu.com/it/u=2198972936,215776677&fm=224&fmt=auto&gp=0.jpg","proName":"虎年对联","proPrice":"29","proComm":"6.4"},
					 {"imgUrl":"http://t14.baidu.com/it/u=2382602825,2194946237&fm=224&app=112&f=JPEG?w=500&h=500","proName":"利是封","proPrice":"9.9","proComm":"7.9"},
					 {"imgUrl":"http://t13.baidu.com/it/u=2325867051,2625811448&fm=224&app=112&f=JPEG?w=500&h=500","proName":"2022年历","proPrice":"18.8","proComm":"3.6"},
                     {"imgUrl":"https://img.pddpic.com/open-gw/2021-12-05/ed8532f9310989fd165e99e7082dca42.jpeg","proName":"2022年新款手机壳","proPrice":"9.9","proComm":"2.5"},
					 {"imgUrl":"https://img.pddpic.com/open-gw/2021-12-08/1600f11bf24fdef99f5dc66b03792873.jpeg","proName":"新年家居挂饰","proPrice":"29.9","proComm":"8.8"},
					 {"imgUrl":"https://img.pddpic.com/mms-material-img/2021-12-15/03754d75-da92-4c50-975a-483deca1fd29.jpeg.a.jpeg","proName":"女童新年衣服套装","proPrice":"199","proComm":"5.2"},
					 {"imgUrl":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi1%2F2608431559%2FO1CN01m2Jj1n1NO42joP5SO_%21%212608431559.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1643622554&t=72f37fb46fb4332754dc21f844674b96","proName":"年橘树","proPrice":"88","proComm":"3.2"},
                     {"imgUrl":"https://img0.baidu.com/it/u=1074494817,1449903894&fm=224&fmt=auto&gp=0.jpg","proName":"新年限定款口罩","proPrice":"9.9","proComm":"3.5"},
                     {"imgUrl":"http://t14.baidu.com/it/u=1467164936,3264541722&fm=224&app=112&f=JPEG?w=500&h=500","proName":"虎年春节贺卡","proPrice":"3.9","proComm":"2.1"},
                     {"imgUrl":"http://5b0988e595225.cdn.sohucs.com/images/20190101/5b6e5ef7547c479abc3e847197f71214.jpeg","proName":"春节限定化妆品套装","proPrice":"799","proComm":"8.2"},
                     {"imgUrl":"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.alicdn.com%2Fbao%2Fuploaded%2Fi2%2F21524264%2FO1CN014yhOnE1hMxTq3ydiO_%21%2121524264.jpg&refer=http%3A%2F%2Fimg.alicdn.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1644173539&t=ac63932f02e4bd83d436d894db4c5556","proName":"春节限定款鞋子","proPrice":"899","proComm":"10.1"},

        ];
		var oBox = document.getElementById("box");
		var oCar = document.getElementById("car");
		var oUl = document.getElementsByTagName("ul")[0];
		for(var i=0; i<aData.length; i++){
			var oLi = document.createElement("li");
			var data = aData[i];
			oLi.innerHTML += '<div class="pro_img"><img src="'+data["imgUrl"]+'" width="150" height="150"></div>';
			oLi.innerHTML += '<h3 class="pro_name"><a href="#">'+data["proName"]+'</a></h3>';
			oLi.innerHTML += '<p class="pro_price">'+data["proPrice"]+'元</p>';
			oLi.innerHTML += '<p class="pro_rank">'+data["proComm"]+'万人已购买</p>';
			oLi.innerHTML += '<div class="add_btn">加入购物车</div>';
			oUl.appendChild(oLi);
		}
		var aBtn = getClass(oBox,"add_btn");
		for(var i=0; i<aBtn.length; i++){
			aBtn[i].index = i;
			aBtn[i].onclick = function(){
				var oDiv = document.createElement("div");
				var data = aData[this.index];
				oDiv.className = "row hid";
				oDiv.innerHTML += '<div class="img left"><img src="'+data["imgUrl"]+'" width="80" height="80"></div>';
				oDiv.innerHTML += '<div class="name left"><span>'+data["proName"]+'</span></div>';
				oDiv.innerHTML += '<div class="price left"><span>'+data["proPrice"]+'元</span></div>';
				oDiv.innerHTML += '<div class="ctrl left"><a href="javascript:;">×</a></div>';
				oCar.appendChild(oDiv);
				var delBtn = oDiv.lastChild.getElementsByTagName("a")[0];
				delBtn.onclick=function(){
					oCar.removeChild(oDiv);
				}
			}
		}
		function getClass(oBox,tagname){
			var aTag = oBox.getElementsByTagName("*");
			var aBox = [];
			for(var i=0; i<aTag.length; i++){
				if(aTag[i].className == tagname){
					aBox.push(aTag[i]);
				}
			}
			return aBox
		}
	}
</script>
</head>
<body>
<div id="box">
	<ul>
	</ul>
</div>
<div id="car" class="car">
	<div class="head_row hid">
		<div class="img left">&nbsp;</div>
		<div class="name left">商品名称</div>
		<div class="price left">单价</div>
		<div class="ctrl left">删除</div>
	</div>
</div>

<div style="text-align:center;margin:60px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>

<footer class="text-muted py-5">
  <div class="container">
    <p class="float-end mb-1">
            <a href="/count" class="btn btn-primary my-xl-1" style="color: whitesmoke;font-size: 25px">提   交</a>
          <br/> <br/><a href="/" class="btn btn-primary my-2">返回首页</a>


    </p>
</footer>
</body>
</html>